home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 16
/
AMIGAplus Sonderheft 16 (1998)(ICP)(DE)[!].iso
/
pd
/
anwendungen
/
rtgmaster_dev
/
goodies
/
asmconv
/
example.asm
< prev
Wrap
Assembly Source File
|
1996-12-08
|
4KB
|
266 lines
.data
constant1 = 10+20
constant2 = 20
constant3 = 30
Index dw 0
Segment dd 0
Long dd 0
Byte db 0
Label1 db 100+6*constant1
Label2 dw 290,3249,4328
db constant1 dup (constant2)
dd 10,0
db 'string',"string"
even
Label3 db 0
even
dw Label3
even
;hex- values:
dw 0ab01h,10h,0abh,0ffh,0ffh
ENDS
.code
Label:
;mov-command ----------------------
mov ax,[ds:si]
mov ax,10[ds:si]
mov [es:di],ax
mov Label3,BYTE PTR[constant1[ds:si+bx]]
; mov Label3,BYTE PTR[constant1[ds:si+bx]]
mov al,constant2+10[es:bx] ; mov al,constant2+10[es:bx]
mov al,constant3[es:si] ; mov al,constant3[es:si]
mov Long,0 ;mov Long,0
mov ax,0 ;mov ax,0
mov bl,0 ;mov bl,0
mov eax,-100 ;mov eax,-100
mov eax,300 ;mov eax,300
mov ax,10 ;mov ax,10
mov di,si ;mov di,si
mov ah,0 ;mov ah,0
mov bh,0 ;mov bh,0
mov ax,bx ;mov ax,bx
mov al,bl ;mov al,bl
mov ah,bh ;mov ah,bh
mov ah,5 ;mov ah,5
mov si,ax ;mov si,ax
mov ax,si ;mov ax,si
mov Label,5 ;mov Label,5
lea bx,Label ;lea bx,Label
; xchg-command ----------------------
xchg ax,bx ;xchg ax,bx
xchg Long,eax ;xchg Long,eax
xchg al,bh ;xchg al,bh
xchg ah,bh ;xchg ah,bh
;add: -------------------------
add di,ax ;add di,ax
add ax,bx ;add ax,bx
add dh,10 ;add dh,10
add bh,ch ;add bh,dh
add Label2,ah ;add Label2,ah
add ax,si ;add ax,si
add si,ax ;add si,ax
add si,1 ;add si,1
and si,ax ;and si,ax
;inc,dec
inc ax ;inc ax
inc bh ;inc bh
dec Label2 ;dec Label2
;cmp
cmp ah,bh ;cmp ah,bh
cmp ah,10 ;cmp ah,10
cmp bl,ah ;cmp bl,ah
cmp Label2,10 ;cmp Label2,10
cmp si,ax ;cmp si,ax
cmp ax,si ;cmp ax,si
cmp si,0 ;cmp si,0
cmp ax,10 ;cmp ax,10
cmp Long,0 ;cmp Long,0
cmp ax,0 ;cmp ax,0
cmp si,di ;cmp si,di
;not:
not ax ;not ax
not ah ;not ah
not si ;not si
not Long ;not Long
;neg:
neg ax ;neg ax
neg ah ;neg ah
neg si ;neg si
neg Long ;neg Long
;sonstige:
mov cx,10 ;mov cx,10
myloop:
loop myloop ;loop Schleife
clc ;clc
stc ;stc
jc myloop ;jc Schleife
jnc myloop ;jnc Schleife
;stack-commands:
push ax ;push ax
pop ax ;pop ax
push si ;push si
pop si ;pop si
;string-commands:
lodsb ;lodsb
lodsw ;lodsw
lodsd ;lodsd
stosb ;stosb
stosw ;stosw
stosd ;stosd
movsb ;movsb
movsw ;movsw
movsd ;movsd
cmpsb ;cmpsb
cmpsw ;cmpsw
cmpsd ;cmpsd
;mul:
mul bx ;mul bx
mul bh ;mul bh
imul bl ;imul bl
mul ax,bx ;mul ax,bx
;div:
div bx ;div bx
div bh ;div bh
idiv bl ;idiv bl
;lea test
lea si,Index ;lea si,Index
lea bx,Index ;lea bx,Index
;les test
les si,DWORD PTR[Index] ; les si,DWORD PTR[Index]
lgs si,DWORD PTR[Index] ; lgs si,DWORD PTR[Index]
;locale labels in procedure test
procedure1 proc
mov ax,0
@@1: ; locale Label in procedure1
@@2: ; " " " "
procedure2 proc
mov ax,1
@@1: ; " " " procedure2
procedure3 proc
mov ax,2
@@1: ; " " " procedure3
endp
@@2:
endp
endp
;macro test
MyMakro1 10,bx,constant1+3 ;MyMakro1 10,bx,constant1+3
MyMakro2 10,bx,constant2+3,3,Label ;MyMakro2 10,bx,constant2+3,3,Label
;jump test
call procedure1 ;call procedure1
call SetImage ;call SetImage
jcxz procedure1 ;jcxz procedure
jecxz procedure1 ;jecxz procedure
je procedure1 ;je procedure1
ENDS
END